<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<th:block th:insert="~{include :: header('群白名单')}"/>
<body>
<div class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-group-white-edit" th:object="${white}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label" for="groupUid">QQ群号：</label>
                <div class="col-sm-8">
                    <div class="input-group">
                        <input class="form-control" id="groupUid" name="groupUid" th:field="*{groupUid}"
                               type="number">
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<th:block th:insert="~{include :: footer}"/>
<script type="text/javascript">
    const prefix = ctx + "config/bot/white/group";

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/update", $('#form-group-white-edit').serialize());
        }
    }

    function doSubmit(index, layero) {
        const tree = layero.find("iframe")[0].contentWindow.$._tree;
        if ($.tree.notAllowLastLevel(tree)) {
            const body = $.modal.getChildFrame(index);
            $("#group").val(body.find('#group').val());
            $.modal.close(index);
        }
    }
</script>
</body>
</html>